package com.picture.wallpaper.dao.dto;

import com.picture.wallpaper.core.commons.Result;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultDto{
    private String data;
    private Boolean r;
    private String code;
    public ResultDto(Boolean b,String d,String code){
        this.r=b;
        this.data=d;
        this.code=code;
    }
    public static ResultDto success(String da,String code){
        return new ResultDto(true, da,code);
    }
    public static ResultDto fail(String da,String code){
        return new ResultDto(false,da,code);
    }
}
